﻿using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Text;

namespace Accouting804.ViewModels.AccountViewModels
{
    public interface IQueryFilterOfAccountRecords
    {
        DateTime From { get; set; }
        DateTime To { get; set; }

        decimal MaxAmount { get; set; }
        decimal MinAmount { get; set; }
        string CategoryFilter { get; set; }
        string PaymentMethodFilter { get; set; }
    }

    public class FilterAndSorterViewModel : AccountsBaseViewModel, IQueryFilterOfAccountRecords
    {

        public DateTime From { get; set; } = DateTime.Now.Add(-TimeSpan.FromDays(15));
        public DateTime To { get; set; } = DateTime.Now.Add(TimeSpan.FromDays(15));

        public int DateSpan
        {
            get => To.Subtract(From).Days;
        }

        public decimal MaxAmount { get; set; } = 0;
        public decimal MinAmount { get; set; } = 1000;

        public string CategoryFilter { get; set; }
        public string PaymentMethodFilter { get; set; }








    }


}
